Skip to content

Conversation

@YoonYn9915
Copy link
Member

@YoonYn9915 YoonYn9915 commented May 3, 2025

🌱WIL

이번 한 주의 소감을 작성해주세요!

  • 이번 한 주는 몸이 안좋아서 정신이 없었다. 이제 java로 코테 준비하기 시작했는데 오랜만에 하다보니 많이 까먹어서 어려운 난이도의 문제를 풀지 못할거 같았다. 그래서 당분간 실버 문제 위주로 풀면서 java 프로그래밍 좀 다시 익힐 예정.

🚀주간 목표 문제 수: 3개

푼 문제


백준 #1912. 연속합: DP / 실버 2

정리한 링크: 바로가기

🚩제출한 코드

n = int(input())
arr = list(map(int, input().split()))
dp = [0] * n
dp[0] = arr[0]
for i in range(1, n):
    dp[i] = max(arr[i], dp[i-1]+arr[i])
print(max(dp))

백준 #1149. RGB거리: DP / 실버 1

정리한 링크: 바로가기

🚩제출한 코드

n = int(input())

cost = []
minCost = -int(1e9)
dp = [[0]*3 for _ in range(n)]
for i in range(n):
    cost.append(list(map(int, input().split())))

dp[0][0], dp[0][1], dp[0][2] = cost[0][0], cost[0][1], cost[0][2]

for i in range(1, n):
    dp[i][0] = min(dp[i-1][1] + cost[i][0], dp[i-1][2] + cost[i][0])
    dp[i][1] = min(dp[i-1][0] + cost[i][1], dp[i-1][2] + cost[i][1])
    dp[i][2] = min(dp[i-1][0] + cost[i][2], dp[i-1][1] + cost[i][2])

print(min(dp[n-1][0], dp[n-1][1], dp[n-1][2]))

백준 #1654. 랜선 자르기: 이분탐색 / 실버 2

정리한 링크: 바로가기

🚩제출한 코드

N, K = map(int, input().split())
lis = []
for _ in range(N):
    lis.append(int(input()))

s = 1
e = max(lis)

while s <= e:
    mid = (s + e) // 2
    LAN = 0
    for i in lis:
        LAN += i // mid
    if LAN >= K:
        s = mid + 1
    else:
        e = mid - 1

print(e)

Copy link
Collaborator

@Mingguriguri Mingguriguri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 Java로 연습하려니까 어려운 난이도는 잘 못 풀겠더라구요.. 같이 화이팅합시다!!
근데 홍주님께서 준비하신 발제 문제(#2110. 공유기 설치)가 없는 것 같아요!
과제 문제는 저랑 플로우나 로직이 비슷한 것 같아서 따로 코드리뷰는 안 남겼어요~! 고생 많으셨습니다!

Copy link
Collaborator

@zaqquum zaqquum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이번 발제 문제는 JAVA 풀이도 업로드 해두었습니다b 담에 함 풀어보시면 좋을 것 같습니다.
건강 꼭 챙기시고 이번주 코테 문제도 화이팅입니다!

@YoonYn9915 YoonYn9915 merged commit c7adc7e into main May 6, 2025
@github-actions
Copy link

github-actions bot commented May 6, 2025

🔥2025-05 챌린지 진행 상황

👉 그래프

  • YoonYn9915: 0개 ❌

👉 DP

  • YoonYn9915: 2개 ❌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants